package com.yuw.finaldemo;

public class Teacher {
	
	//属性
	private final String teaName;
	private int teaAge;
	
	//行为方法
	public String getTeaName() {
		return teaName;
	}
	
	

	public Teacher() {
		super();
		// 保证final属性进行初始化
		this.teaName="张三";
	}

	public Teacher(String teaName, int teaAge) {
		super();
		this.teaName = teaName;//保证对final属性进行初始化
		this.teaAge = teaAge;
	}





	//final类型的成员变量，不能提供set方法
	//public void setTeaName(String teaName) {
	//	this.teaName = teaName;
	//}
	public int getTeaAge() {
		return teaAge;
	}
	public void setTeaAge(int teaAge) {
		this.teaAge = teaAge;
	}
	

}
